package com.xiongda.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 博客
 * @author 缪琼
 */
public class Blog {
    private Long id;// id

    private Long userId;// 用户id

    private Long categoryId;// 分类id

    private String title;// 标题

    private Date createTime;// 创建时间

    private Date updateTime;// 更新时间

    private Integer editCount;// 编辑次数

    private Integer delFlag;// 逻辑删除标识

    private Integer praise;// 点赞

    private Integer readCount;// 阅读量

    private Integer backgroundStyle;// 背景样式

    private Integer isComment;// 是否可评论

    public Blog(Long id, Long userId, Long categoryId, String title, Date createTime, Date updateTime, Integer editCount, Integer delFlag, Integer praise, Integer readCount, Integer backgroundStyle, Integer isComment) {
        this.id = id;
        this.userId = userId;
        this.categoryId = categoryId;
        this.title = title;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.editCount = editCount;
        this.delFlag = delFlag;
        this.praise = praise;
        this.readCount = readCount;
        this.backgroundStyle = backgroundStyle;
        this.isComment = isComment;
    }

    public Blog() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getEditCount() {
        return editCount;
    }

    public void setEditCount(Integer editCount) {
        this.editCount = editCount;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    public Integer getReadCount() {
        return readCount;
    }

    public void setReadCount(Integer readCount) {
        this.readCount = readCount;
    }

    public Integer getBackgroundStyle() {
        return backgroundStyle;
    }

    public void setBackgroundStyle(Integer backgroundStyle) {
        this.backgroundStyle = backgroundStyle;
    }

    public Integer getIsComment() {
        return isComment;
    }

    public void setIsComment(Integer isComment) {
        this.isComment = isComment;
    }
}